<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@include file="../../common/includeBaseSet.jsp" %>
<%@include file="../../common/operation_forbid.jsp" %>
<%@include file="../../common/jsVersion.jsp" %>
<!DOCTYPE html >
<html lang="en">
<head>
    <meta charset="utf-8">
<!--     <title>销控列表</title> -->
	<title>交易记录</title>
    <!-- neptune -->
	<link rel="stylesheet" type="text/css"  href="${jypath}/static/ext/resources/ext-theme-gray/ext-theme-gray-all.css" />
    <script type="text/javascript" src="${jypath}/static/ext/ext-all.js"></script>
 	<script type="text/javascript" src="${jypath}/static/ext/locale/ext-lang-zh_CN.js"></script>
	<script type="text/javascript" src="${jypath}/static/js/marketing/pin/pinGou.js?v=${jsVersion}"></script> 
	<script type="text/javascript" src="${jypath}/static/js/marketing/pin/pinChange.js?v=${jsVersion}"></script> 
	<script type="text/javascript" src="${jypath}/static/js/marketing/pin/pinGroup.js?v=${jsVersion}"></script> 
 	<script type="text/javascript" src="${jypath}/static/js/marketing/pin/pinSigning.js?v=${jsVersion}"></script> 
	<script type="text/javascript" src="${jypath}/static/js/marketing/pin/pinRetain.js?v=${jsVersion}"></script> 
	<script type="text/javascript" src="${jypath}/static/js/marketing/pin/pinMarket.js?v=${jsVersion}"></script> 
	<script type="text/javascript" src="${jypath}/static/js/components/estateComponent.js?v=${jsVersion}"></script>
	<script type="text/javascript" src="${jypath}/static/js/marketing/pin/pinSale.js?v=${jsVersion}"></script>
	<script type="text/javascript" src="${jypath}/static/js/jquery/json2.js"></script> 
	<script type="text/javascript" src="${jypath}/static/js/components/roomInfoComponent.js?v=${jsVersion}"></script> 
	<script type="text/javascript" src="${jypath}/static/js/components/batchSellControlComponent.js?v=${jsVersion}"></script> 
	<script type="text/javascript" src="${jypath}/static/js/components/batchSellCancelControlComponent.js?v=${jsVersion}"></script> 
	<script type="text/javascript" src="${jypath}/static/js/components/businessComponent.js?v=${jsVersion}"></script>
	<script type="text/javascript" src="${jypath}/static/js/components/signeAmountRepairData.js?v=${jsVersion}"></script>  
	
	
	<script type="text/javascript">
		var templet = "${templet}";
		var templet_cw = "${templet_cw}";
		var userName = "${userName}";
		var payDepositOff = ${payDepositOff};
	 	var menu = '${menu}';
	 	var resourcesCode = '${menu}';
	  	var idata = '${permitBtn}';
	  	if(idata!=null||idata!=""){
			idata=JSON.parse(idata);
		}
	 	var maketingRetainAdd = true;   
		var marketingPayDepositAdd = true;
		var marketingSubscribeAdd = true ; 
		var marketingSignedAdd = true ;
		var marketingSellControlAdd = true ;
		var dataRepairSubscribeDelete = true;
		
		var subDataExport = true;
		if(Ext.Array.contains(idata,"customer:subscribe:export")){
			subDataExport = false;
		}
		var sigDataExport = true;
		if(Ext.Array.contains(idata,"customer:signed:export")){
			sigDataExport = false;
		}
		var retainDataExport = true;
		if(Ext.Array.contains(idata,"customer:retain:export")){
			retainDataExport = false;
		}
		
		var sellDataExport = true;
		if(Ext.Array.contains(idata,"customer:sell:export")){
			sellDataExport = false;
		}
		var businessChangeExport = true;
		if(Ext.Array.contains(idata,"customer:businessChange:export")){
			businessChangeExport = false;
		}

		
		//认购时间变更
		var dataRepairSubscribeDate = true;
		//删除认购记录
		//签约时间变更
		var dataRepairSigneDate = true;
		if(Ext.Array.contains(idata,"data:repair:signeDate")){
			dataRepairSigneDate = false;
		}

		if(Ext.Array.contains(idata,"data:repair:subscribeDelete")){
			dataRepairSubscribeDelete = false;
		}
		if(Ext.Array.contains(idata,"data:repair:subscribeDate")){
			dataRepairSubscribeDate = false;
		}
		//合同信息变更
		var dataRepairSigneInfo=true;
		if(Ext.Array.contains(idata,"data:repair:signeInfo")){
			dataRepairSigneInfo=false;
		}
		
	 	//保留、认筹、认购、签约、销控 权限按钮控制
		if(Ext.Array.contains(idata,"marketing:retain:add")){
			maketingRetainAdd=false;
		}
		if(Ext.Array.contains(idata,"marketing:payDeposit:add")){
			marketingPayDepositAdd=false;
		}
		if(Ext.Array.contains(idata,"marketing:subscribe:add")){
			marketingSubscribeAdd=false;
		}
		if(Ext.Array.contains(idata,"marketing:signed:add")){
			marketingSignedAdd=false;
		}
		if(Ext.Array.contains(idata,"marketing:sellControl:add")){
			marketingSellControlAdd=false;
		}
	 	Ext.onReady(function() {
 			
	 		var rcPanel=Ext.create('component.marketing.rcPanel');
		 	var rgPanel= new Ext.create('component.marketing.rgPanel');
		 	var signingPanel= new Ext.create('component.marketing.signingPanel');
		 	var retainPanel= new Ext.create('component.marketing.retainPanel');
		 	var marketPanel= new Ext.create('component.marketing.marketPanel');
		 	var salePanel= new Ext.create('component.marketing.salePanel');
		 	var pinChange= new Ext.create('component.marketing.pinChange');

		 	var tabs2 = Ext.widget('tabpanel', {
		        renderTo: document.body,
		        layout : 'fit',
		        activeTab: 0,
		        plain: true,
		        defaults :{
		            autoScroll: true,
		            bodyPadding: 10
		        },
		        items: [{
		                title: '认筹',
		                layout : 'fit',
		                items:rcPanel
		            },{
		                title: '认购',
		                layout : 'fit',
		                items:rgPanel
		            },{
		                title: '签约',
		                layout : 'fit',
		                items: signingPanel
		            },{
		                title: '保留',
		                layout : 'fit',
		                items: retainPanel
		            },{
		                title: '销控',
		                layout : 'fit',
		                items: marketPanel
		            },{
		            	title: '退换',
		            	layout: 'fit',
		            	items : pinChange
		            }
// 		            ,{
// 		                title: '可售',
// 		                layout : 'fit',
// 		                items: salePanel
// 		            }
		        ], 
                listeners:{ 
                    tabchange:function(tp,p){ 
                        if(p.title=='认购'){ 
                        	//console.log(rgPanel);
                        	//alert(rgPanel);
                        	//rgPanel.load(jypath+'/customer/subscribe/list');
                        } 
                    } 
                }
		    });
		 	if(payDepositOff){
		   		tabs2.remove("rcPanel");
		   	}
	 	})
	 
	 

		
	 
		function openWindow(roomId){
			//弹出详情框
			 var windowInfo=Ext.create('component.room.InfoWindow',{
				 roomId:roomId,
				 jumpFlag:'1'
			 });
			 windowInfo.show();
		}
	</script>
</head>
<body>
</body>
</html>